{% extends 'blog/base.html' %}

{% block content %}
	<div class="date">
		{% if post.published_date %}
			{{ post.published_date }}
		{% else %}
			{% if user.is_authenticated %}
				<a class="btn btn-default" href="{% url 'post_publish' pk=post.pk %}">Publish</a>
			{% endif %}
		{% endif %}
		{% if user.is_authenticated %}
			<a class="btn btn-default" href="{% url 'post_edit' pk=post.pk %}"><span class="glyphicon glyphicon-pencil"></span></a>
			<a class="btn btn-default" href="{% url 'post_remove' pk=post.pk %}"><span class="glyphicon glyphicon-remove"></span></a>
		{% endif %}
	</div>
	<h1> {{ post.title }} </h1>
	<p> {{ post.text|linebreaks }} </p>
{% endblock %}